import React from 'react'
import {
  AppBar,
} from 'material-ui'
import Login from './login'
import Logged from './logged'

import {
  inject,
  observer,
} from 'mobx-react'

@inject(stores => {
  return {
    user: stores.appStore.user
  }
})
@observer
class AppHeader extends React.Component {
  constructor() {
    super()
    this.state = {
      logged: false
    }
  }
  render() {
    return (
      <AppBar
        title="博客页面"
        iconElementRight={this.props.user.isLogin ? <Logged /> : <Login />}
      >
      </AppBar>
    )
  }
}
export default AppHeader
